<?php /* Smarty version 2.6.26, created on 2014-09-30 14:54:29
         compiled from ../Common/right.html */ ?>
<div id='right'>
    <?php if ($_SESSION['uid']): ?>
    <div class='userinfo'>
        <dl>
            <dt>
            <a href="<?php echo @__ROOT__; ?>
?c=Member"><img src="<?php echo @__FRAME__; ?>
/<?php echo $this->_tpl_vars['userinfo']['face']; ?>
" width='48' height='48' alt="个人中心"/></a>
            </dt>
            <dd class='username'>
                <a href="">
                    <b><?php echo $this->_tpl_vars['userinfo']['username']; ?>
</b>
                </a>
                <a href="">
                    <i class='level lv1' title='Level 1'></i>
                </a>
            </dd>
            <dd>金币：<a href="" style="color: #888888;"><?php echo $this->_tpl_vars['userinfo']['point']; ?>
<b class='point'></b></a></dd>
            <dd>经验值：<?php echo $this->_tpl_vars['userinfo']['exp']; ?>
</dd>
        </dl>
        <table>
            <tr>
                <td>回答数</td>
                <td>采纳率</td>
                <td class='last'>提问数</td>
            </tr>
            <tr>
                <td><a href="<?php echo @__ROOT__; ?>
?c=Member&m=my_answer"><?php echo $this->_tpl_vars['userinfo']['answer']; ?>
</a></td>
                <td><a href=""><?php echo $this->_tpl_vars['percent']; ?>
%</a></td>
                <td class='last'><a href="<?php echo @__ROOT__; ?>
?c=Member&m=my_ask"><?php echo $this->_tpl_vars['userinfo']['ask']; ?>
</a></td>
            </tr>
        </table>
        <ul>
            <li><a href="<?php echo @__ROOT__; ?>
?c=Member&m=my_ask">我提问的</a></li>
            <li><a href="<?php echo @__ROOT__; ?>
?c=Member&m=my_answer">我回答的</a></li>
        </ul>
    </div>
    <?php else: ?>
    <div class='r-login'>
        <span class='login'><i></i>&nbsp;登录</span>
        <span class='register'><i></i>&nbsp;注册</span>
    </div> 
    <?php endif; ?>

    <div class='clear'></div>
    <div class='star'>
        <p class='title'>后盾问答之星</p>
        <?php if ($this->_tpl_vars['topAns']): ?>
         <span class='star-name'>本日回答问题最多的人</span>
        <div class='star-info'>
            <div>
                <a href="" class='star-face'>
                    <img src="<?php echo @__FRAME__; ?>
/<?php echo $this->_tpl_vars['topAns']['face']; ?>
" width='48px' height='48px' alt="头像站位"/>
                </a>
                <ul>
                    <li><a href=""><?php echo $this->_tpl_vars['topAns']['username']; ?>
</a></li>
                    <i class='level lv1' title='Level 1'></i>
                </ul>
            </div>
            <ul class='star-count'>
                <li>回答数：<span><?php echo $this->_tpl_vars['topnum']; ?>
</span></li>
                <li>采纳率：<span><?php echo $this->_tpl_vars['percent2']; ?>
%</span></li>
            </ul>
        </div>
        <?php endif; ?>
        <?php if ($this->_tpl_vars['HistoryAns']): ?>
        <span class='star-name'>历史回答问题最多的人</span>
        <div class='star-info'>
            <div>
                <a href="" class='star-face'>
                    <img src="<?php echo @__FRAME__; ?>
/<?php echo $this->_tpl_vars['HistoryAns']['face']; ?>
" width='48px' height='48px' alt="头像站位"/>
                </a>
                <ul>
                    <li><a href=""><?php echo $this->_tpl_vars['HistoryAns']['username']; ?>
</a></li>
                    <i class='level lv1' title='Level 1'></i>
                </ul>
            </div>
            <ul class='star-count'>
                <li>回答数：<span><?php echo $this->_tpl_vars['HistoryAns']['answer']; ?>
</span></li>
                <li>采纳率：<span><?php echo $this->_tpl_vars['percent3']; ?>
%</span></li>
            </ul>
        </div>
        <?php endif; ?>
    </div>
   
    <div class='star-list'>
        <p class='title'>后盾问答助人光荣榜</p>
        <div>
            <ul class='ul-title'>
                <li>用户名</li>
                <li style='text-align:right;'>帮助过的人数</li>
            </ul>
            <ul class='ul-list'>
                <?php unset($this->_sections['n']);
$this->_sections['n']['loop'] = is_array($_loop=$this->_tpl_vars['honor']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['n']['name'] = 'n';
$this->_sections['n']['show'] = true;
$this->_sections['n']['max'] = $this->_sections['n']['loop'];
$this->_sections['n']['step'] = 1;
$this->_sections['n']['start'] = $this->_sections['n']['step'] > 0 ? 0 : $this->_sections['n']['loop']-1;
if ($this->_sections['n']['show']) {
    $this->_sections['n']['total'] = $this->_sections['n']['loop'];
    if ($this->_sections['n']['total'] == 0)
        $this->_sections['n']['show'] = false;
} else
    $this->_sections['n']['total'] = 0;
if ($this->_sections['n']['show']):

            for ($this->_sections['n']['index'] = $this->_sections['n']['start'], $this->_sections['n']['iteration'] = 1;
                 $this->_sections['n']['iteration'] <= $this->_sections['n']['total'];
                 $this->_sections['n']['index'] += $this->_sections['n']['step'], $this->_sections['n']['iteration']++):
$this->_sections['n']['rownum'] = $this->_sections['n']['iteration'];
$this->_sections['n']['index_prev'] = $this->_sections['n']['index'] - $this->_sections['n']['step'];
$this->_sections['n']['index_next'] = $this->_sections['n']['index'] + $this->_sections['n']['step'];
$this->_sections['n']['first']      = ($this->_sections['n']['iteration'] == 1);
$this->_sections['n']['last']       = ($this->_sections['n']['iteration'] == $this->_sections['n']['total']);
?>
                <li>
                    <a href="#"><i class='rank r<?php echo $this->_sections['n']['index']+1; ?>
'></i><?php echo $this->_tpl_vars['honor'][$this->_sections['n']['index']]['username']; ?>
</a>
                    <span><?php echo $this->_tpl_vars['honor'][$this->_sections['n']['index']]['accept']; ?>
</span>
                </li>
                <?php endfor; endif; ?>
            </ul>
        </div>
    </div>
</div>
<!-- ---右侧结束---- -->